package com.some;

import java.util.Scanner;

public class PrimeNum {
    public boolean isPrime(int num) {
        for (int i = 2; i <= Math.sqrt(num); i++) {
            if (num % i == 0) {
                return false;
            }
        }
        return true;
    }

    public static void main(String[] args) {
        Scanner sc = new Scanner(System.in);
        PrimeNum primeNum = new PrimeNum();
        System.out.println(primeNum.isPrime(sc.nextInt()));
    }
}
